home *** CD-ROM | disk | FTP | other *** search
/ Input 64 / Input_64_85-04_1985_Verlag_Heinz_Weise_de.d64 / R E V E R S I (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  8KB  |  199 lines

  1. 1 :poke50257,16
  2. 10 poke56,128:clr:dima(9,9),b(9,9),c(9,9):st$="   [157][157][157]   [146]":sys9822
  3. 20 poke53281,0:poke53280,15:gosub90:poke650,128:restore
  4. 30 pi=54272:v=53248:pokev+21,0:pokev+29,0:pokev+23,0:wr=0:sp=2:cp=2:yr=-2
  5. 40 fori=0to9:xr=0:forx=0to9:a(i,x)=xr:b(i,x)=yr:c(i,x)=wr
  6. 50 xr=xr+4:next:yr=yr+3:next
  7. 60 c(4,4)=1:c(4,5)=-1:c(5,4)=-1:c(5,5)=1
  8. 80 fori=1to8:readb4(i),b5(i):next:goto250
  9. 90 printchr$(14);:print"[147]";
  10. 100 print"        [144][146]     [144][146]  [144][146]   [144][146]  ";
  11. 110 print"   [144][146]     [144][146]     [144][146]   [144][146]         ";
  12. 120 print"[144][146]   [144][146]  [144][146]     [144][146]   [144][146]  [144][146]     [144][146]   [144][146]  ";
  13. 130 print"[144][146]      [144][146]         [144][146]   [144]  [144][146]     ";
  14. 140 print"[144][146]   [144][146]  [144][146]     [144][146]   [144][146]  [144][146]      [144][146]    ";
  15. 150 print"    [158]    [144][146] [158]  [144][146]   [158] [144][146]  [158] [144][146] [158]  [144][146]   [158] ";
  16. 160 print"   [144][146] [158]    [144][146]  [158] [144][146]        [149] [144][146] [149] [144][146]  [149] ";
  17. 170 print"[144] [146]   [149][181][146][161][181][146][161][144] [149] [144][146]    [149] [144][146] [149] [144][146]  [149]    [144][146]  ";
  18. 180 print"[149] [144][146]        [154] [144][146]  [154] [144][146] [154] [144][146]     [154]  [144][146]  [154] ";
  19. 190 print"[144][146]    [154] [144][146]  [154] [144][146]    [154] [144][146]  [154] [144][146]        [159] ";
  20. 200 print"[144][146]  [159] [144][146] [159]    [144][146]  [159][161][146][161]      [144][146] [159] [144][146]  [159] [144][146] [159] ";
  21. 210 print"   [144][146]  [159] [144][146]                   ";
  22. 220 print"                         ";
  23. 230 print"           [158]   von [202]uergen";
  24. 240 print" [202]ost[144]":return
  25. 250 print"          [150]  1 - [211]pielanleitung[144] "
  26. 260 print"            [150]2[144] [150]- [211]pielstart";
  27. 270 sys32768:poke198,0:fori=54276to54290step7:pokei,0:next
  28. 280 ifpeek(33216)=56then310
  29. 290 ifpeek(33216)=59then580
  30. 300 goto270
  31. 310 poke646,12:printchr$(147):xr=12:yr=1:gosub1790
  32. 320 print"[211]pielanleitung"
  33. 330 print"[214]ersuche moeglichst viele [211]teine der    "
  34. 340 print"eigenen [198]arbe auf das [194]rett zu setzen.  "
  35. 350 print"[218]u [194]eginn liegen je 2 [211]teine der beiden "
  36. 360 print"[198]arben in der [205]itte. [204]ege nun waehrend  "
  37. 370 print"deines [218]uges einen [211]tein deiner [198]arbe   "
  38. 380 print"auf das [194]rett. [196]ieses muss immer so     "
  39. 390 print"geschehen, dass die [211]teine des [195]omputers"
  40. 400 print"von deinen [211]teinen in [204]inie ein-        "
  41. 410 print"geschlossen werden. [200]orizontal[146],vertikal[146] "
  42. 420 print"oder diagonal[146]. [196]ie eingeschlossenen     "
  43. 430 print"[211]teine wechseln die [198]arbe.   < [212]aste > ";
  44. 440 getq$:ifq$=""then440
  45. 450 print"[147][203]ann kein [211]tein gedreht werden, muss man "
  46. 460 print"passen. [218]um [208]assen setze oben links in  "
  47. 470 print"das rote [198]eld einen [211]tein. [196]as [211]piel    "
  48. 480 print"endet, wenn alle 64 [198]elder belegt sind  "
  49. 490 print"oder kein [211]tein mehr gesetzt werden     "
  50. 500 print"kann. [205]it dem [202]oystick oder der [212]astatur"
  51. 510 print"kann das [203]reuz zum [211]etzen der [211]teine    "
  52. 520 print"bewegt werden. [205]it [198]euer oder [211]pace wird"
  53. 530 print"der [211]tein gesetzt. [194]ei einer [198]ehleingabe"
  54. 540 print"wird das [203]reuz an den zuletzt gesetzten "
  55. 550 print"[195]omputerstein zurueck gesetzt. < [212]aste >";
  56. 560 getq$:ifq$=""then560
  57. 570 gosub90:goto250
  58. 580 poke2040,129:pokev+39,11
  59. 600 printchr$(147):poke646,12
  60. 610 xr=5:yr=5:gosub1790
  61. 620 print"[202]oystick  #2"
  62. 630 xr=5:yr=7:gosub1790
  63. 640 print"<[211]pace> = [211]tein setzen"
  64. 650 print"           [193] = [203]reuz rechts"
  65. 660 print"           [211] = [203]reuz links"
  66. 670 print"           [208] = [203]reuz hoch"
  67. 680 print"           [204] = [203]reuz runter"
  68. 690 ss=2
  69. 700 xr=5:yr=14:gosub1790
  70. 710 print"[211][146]chwarz oder [215][146]eiss ? ";:poke204,0
  71. 720 getq$:ifq$="s"thenc=1:h=-1:goto750
  72. 730 ifq$="w"thenc=-1:h=1:goto750
  73. 740 goto720
  74. 750 poke204,1:printq$
  75. 760 xr=5:yr=16:gosub1790
  76. 770 print"[215]ollen [211]ie anfangen ( [202][146] / [206][146] ) ? ";:poke204,0
  77. 780 getq$:ifq$="j"then810
  78. 790 ifq$="n"then810
  79. 800 goto780
  80. 810 poke204,1:printq$:gosub1510:tt=h:te=c:sp=cp:ne=4:ww=0
  81. 820 ifq$="j"thenia=4:xa=5:goto1040
  82. 830 bb=-1:ia=0:xa=0:tt=h:te=c:xr=1:yr=11:gosub1790:print"c[146][157]";:poke204,0
  83. 840 fori=1to8:forx=1to8
  84. 850 ifc(i,x)<>0then980
  85. 860 gosub1390
  86. 870 iffb=0then980
  87. 880 ut=-1:gosub1420
  88. 890 ifsv=0then980
  89. 900 if(i-1)*(i-8)<>0then920
  90. 910 sv=sv+ss
  91. 920 if(x-1)*(x-8)<>0then940
  92. 930 sv=sv+ss
  93. 940 ifsv<bbthen980
  94. 950 ifsv>bbthen970
  95. 960 ifrnd(1)>0.5then980
  96. 970 bb=sv:ia=i:xa=x:gosub1750
  97. 980 nextx,i
  98. 990 ifbb>0then1020
  99. 1000 ifww=1then1860
  100. 1010 ww=1:x=0:i=1:gosub1750:poke204,1:print"c[146]":po=23:gosub2030:goto1050
  101. 1020 i=ia:x=xa:ut=1:ww=0:poke204,1:print"c":po=23:gosub2030
  102. 1030 gosub1750:gosub1420:gosub1710:gosub1830
  103. 1040 i=ia:x=xa:pokev+21,1
  104. 1050 te=h:tt=c:xr=37:yr=12:gosub1790:print"s[146][157]";:poke204,0:poke198,0
  105. 1060 j=peek(56320):getq$
  106. 1070 if(jand1)=0orq$="p"theni=i-1
  107. 1080 if(jand2)=0orq$="l"theni=i+1
  108. 1090 if(jand4)=0orq$="a"thenx=x-1
  109. 1100 if(jand8)=0orq$="s"thenx=x+1
  110. 1110 ifx=0andi=1then1160
  111. 1120 ifx<1thenx=1
  112. 1130 ifx>8thenx=8
  113. 1140 ifi>8theni=8
  114. 1150 ifi<1theni=1
  115. 1160 if(jand16)=0orq$=" "then1210
  116. 1170 xr=a(i,x)*8+24:yr=b(i,x)*8+50
  117. 1180 ifxr>255thenxr=xr-255:pokev+16,1:goto1200
  118. 1190 ifxr<255thenpokev+16,0
  119. 1200 pokev,xr:pokev+1,yr:goto1060
  120. 1210 pokev+21,0:poke204,1:print"s":po=20:gosub2030
  121. 1220 ifx<>0then1250
  122. 1230 ifww=1then1860
  123. 1240 ww=1:goto830
  124. 1250 ww=0
  125. 1260 ifc(i,x)=0then1280
  126. 1270 gosub2030:goto1040
  127. 1280 gosub1390
  128. 1290 iffb=1then1310
  129. 1300 gosub2030:goto1040
  130. 1310 ut=-1:gosub1420:ifsv>0then1330
  131. 1320 gosub2030:goto1040
  132. 1330 ww=0:ut=1:gosub1420:gosub1710:gosub1800:goto830
  133. 1380 data0,1,-1,1,-1,0,-1,-1,0,-1,1,-1,1,0,1,1
  134. 1390 fb=0:foric=-1to1:forxc=-1to1:ifc(i+ic,x+xc)=ttthen1410
  135. 1400 nextxc,ic:return
  136. 1410 fb=1:return
  137. 1420 sv=0:forkt=1to8:id=b4(kt):xd=b5(kt):ik=i+id:xk=x+xd:sq=0
  138. 1430 ifc(ik,xk)<>ttthen1500
  139. 1440 sq=sq+1:ik=ik+id:xk=xk+xd
  140. 1450 ifc(ik,xk)=tethen1480
  141. 1460 ifc(ik,xk)=0then1500
  142. 1470 goto1440
  143. 1480 sv=sv+sq:ifut<>1then1500
  144. 1490 ik=i:xk=x:forkk=0tosq:c(ik,xk)=te:ik=ik+id:xk=xk+xd:nextkk
  145. 1500 nextkt:return
  146. 1510 pokev+17,peek(v+17)and239:poke53280,0:poke53281,5:poke646,0
  147. 1520 printchr$(142);:printchr$(147);
  148. 1530 print"   [146][176][195][195][195][178][195][195][195][178][195][195][195][178][195][195][195][178][195][195][195][178][195][195][195][178][195][195][195][178][195][195][195][174]    [146]";
  149. 1540 fori=0to7
  150. 1550 forx=0to1
  151. 1560 print"   [146][194]   [194]   [194]   [194]   [194]   [194]   [194]   [194]   [194]    [146]";
  152. 1570 next
  153. 1580 ifi=7thennext:goto1610
  154. 1590 print"   [146][171][195][195][195][219][195][195][195][219][195][195][195][219][195][195][195][219][195][195][195][219][195][195][195][219][195][195][195][219][195][195][195][179]    [146]";
  155. 1600 next
  156. 1610 print"   [146][173][195][195][195][177][195][195][195][177][195][195][195][177][195][195][195][177][195][195][195][177][195][195][195][177][195][195][195][177][195][195][195][189]   [146]";
  157. 1620 poke2023,160:poke56295,0
  158. 1630 poke646,0:poke211,0:poke214,0:sys58732:print"pas[157][157][157][150]";st$;"[144][157][157][157]sen[146]"
  159. 1640 gosub1710
  160. 1650 xr=1:yr=11:poke646,0:poke199,1:gosub1790
  161. 1660 print"c[157]o[157]m[157]p[157]u[157]t[157]e[157]r"
  162. 1670 xr=37:yr=12:poke646,0:poke199,1:gosub1790
  163. 1680 print"s[157]p[157]i[157]e[157]l[157]e[157]r"
  164. 1690 gosub1990:pokev+17,peek(v+17)or16:return
  165. 1700 poke211,a(i,x):poke214,b(i,x):sys58732:printst$;:return
  166. 1710 fori=1to8:forx=1to8
  167. 1720 ifc(i,x)<0thenpoke646,0:gosub1700
  168. 1730 ifc(i,x)>0thenpoke646,15:gosub1700
  169. 1740 next:next:return
  170. 1750 xr=a(i,x)*8+24:yr=b(i,x)*8+50
  171. 1760 ifxr>255thenxr=xr-255:pokev+16,1:goto1780
  172. 1770 ifxr<255thenpokev+16,0
  173. 1780 pokev,xr:pokev+1,yr:pokev+21,1:return
  174. 1790 poke211,xr:poke214,yr:sys58732:return
  175. 1800 sp=sp+sv+1:cp=cp-sv:ne=ne+1:gosub1990
  176. 1810 ifcp=0orne=64thengoto1860
  177. 1820 return
  178. 1830 cp=cp+sv+1:sp=sp-sv:ne=ne+1:gosub1990
  179. 1840 ifsp=0orne=64thengoto1860
  180. 1850 return
  181. 1860 ifcp>spthengoto1900
  182. 1870 ifcp<spthengoto1920
  183. 1880 xr=3:yr=0:poke646,0:poke199,1:gosub1790
  184. 1890 print"  das spiel ging unentschieden aus   ";:goto1940
  185. 1900 xr=3:yr=0:poke646,0:poke199,1:gosub1790
  186. 1910 print"   das spiel gewann der computer     ";:goto1940
  187. 1920 xr=3:yr=0:poke646,0:poke199,1:gosub1790
  188. 1930 print"      das spiel gewannst du          ";
  189. 1940 xr=0:yr=24:poke646,0:poke199,1:gosub1790
  190. 1950 print"         <   t  a  s  t  e   >         [157][157][157][157][157]";
  191. 1960 fori=1to2000:geta$:ifa$=""thennext:pokev+21,0:goto20
  192. 1970 i=2000:next:pokev+21,0:goto20
  193. 1990 xr=0:yr=20:poke199,1:poke646,0:gosub1790
  194. 2000 print"   [157][157][157]";cp
  195. 2010 xr=36:yr=20:poke199,1:poke646,0:gosub1790
  196. 2020 print"   [157][157][157]";sp:return
  197. 2030 pokepi+24,15:pokepi+18,17:pokepi+19,0:pokepi+20,200
  198. 2040 pokepi+14,50:pokepi+15,po:foriq=1to250:next:pokepi+18,0:pokepi+24,15:return
  199.